package com.tedu.web;

import com.tedu.pojo.User;
import com.tedu.service.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 模拟前端请求
 */
@Component
public class UserServlet {

    //userServices实例化和管理   交给谁管理？？？？
    @Autowired
    UserServices userServices ;

    /**
     * 模拟一下用户登录
     * @return
     */
    public User login() throws Exception {
        //先注册
        userServices.add();

        return userServices.login("姓名","密码");
    }



}
